CSharpTest.Net
KeySerializer Property
See Also  Example Send Feedback Download Help File
CSharpTest.Net.BPlusTree Assembly > CSharpTest.Net.Collections Namespace > BPlusTreeOptions<TKey,TValue> Class : KeySerializer Property

Glossary Item Box

Accesses the key serializer given to the constructor

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property KeySerializer As ISerializer(Of TKey)
C# 
public ISerializer<TKey> KeySerializer {get;}

Example

BPlusTree/BPlusTree.Test/TestBackupAndRecovery.cs

C#Copy Code
using (TempFile temp = new TempFile())
{
    var options = GetOptions(temp);
    options.MaximumValueNodes = 255;
    options.MinimumValueNodes = 100;
    options.TransactionLog = new TransactionLog<Guid, TestInfo>(
        new TransactionLogOptions<Guid, TestInfo>(
            options.TransactionLogFileName,
            options.KeySerializer,
            options.ValueSerializer
            ) { FileOptions = FileOptions.None } /* no-write through */
        );
    TestRecoveryOnExisting(options, 100, ushort.MaxValue);
}
VB.NETCopy Code
Using temp As New TempFile()
    Dim options As var = GetOptions(temp)
    options.MaximumValueNodes = 255
    options.MinimumValueNodes = 100
        ' no-write through 
    options.TransactionLog = New TransactionLog(Of Guid, TestInfo)(New TransactionLogOptions(Of Guid, TestInfo)(options.TransactionLogFileName, options.KeySerializer, options.ValueSerializer) With { _
        Key .FileOptions = FileOptions.None _
    })
    TestRecoveryOnExisting(options, 100, UShort.MaxValue)
End Using

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys